package grails.goods.base

import grails.rest.RestfulController

class BaseController extends RestfulController {

    BaseController() {
        super(BaseController)
    }

    def getParameter() {
        def param = [:]
        def requestData = request.JSON
        def paramData = params
        if (requestData) {
            paramData.putAll(requestData)
        }
        paramData?.each { key, value ->
            if (value && value instanceof String)
                param << [(key): value.toString().trim()]
            else
                param << [(key): value]
            return param
        }
    }

    def index() {}
}
